import { get, post } from './request'

/**
 * 获取普通用户信息
 */
function getUsers(params) {
  return get(`/users/commonuser`, params.pagination)
}
/**
 * 添加普通用户
 */
function addCommUser(params) {
  return post(`/users/commonuser`, params)
}
/**
 * 修改登录普通用户登录状态
 */
function changeCommUserStatu(params) {
  return post(`/users/commonuser/onlinestatus`, params)
}
//修改用户 deleteCommUser
function changeCommUser(params) {
  return post(`/users/commonuser/changeCommUser`, params)
}
//usertype
function changeCommUserType(params) {
  return post(`/users/commonuser/usertype`, params)
}
//删除用户 deleteCommUser
function deleteCommUser(params) {
  return post(`/users/commonuser/delete`, params)
}
//查询 filterUser
function filterUser(params) {
  return get(`/users/commonuser/filterUser`, params)
}
//======================交管用户==================================
/**
 * 获取交管用户信息
 */
function getTrafficUsers(params) {
  return get(`/users/trafficuser`, params.pagination)
}
/**
 * 添加交管用户
 */
function addTrafficUser(params) {
  return post(`/users/trafficuser`, params)
}
/**
 * 修改登录交管用户登录状态
 */
function changeTrafficUserStatu(params) {
  return post(`/users/trafficuser/onlinestatus`, params)
}
//
//修改用户 deleteCommUser
function changeTrafficUser(params) {
  return post(`/users/trafficuser/change`, params)
}
//删除用户 deleteCommUser
function deleteTrafficUser(params) {
  return post(`/users/trafficuser/delete`, params)
}
//usertype
function changeTrafficUserType(params) {
  return post(`/users/trafficuser/usertype`, params)
}
//查询 filterUser
function filterTrafficUser(params) {
  return get(`/users/trafficuser/filterUser`, params)
}
export {
  getUsers,
  addCommUser,
  changeCommUserStatu,
  deleteCommUser,
  changeCommUser,
  filterUser,
  changeCommUserType,
  getTrafficUsers,
  addTrafficUser,
  changeTrafficUserStatu,
  changeTrafficUser,
  deleteTrafficUser,
  filterTrafficUser,
  changeTrafficUserType,
}
